#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include<math.h>
#include<algorithm>
using namespace std;

int main() {
    double a;
    char b;
    cin >> a >> b;
    int ans = 20;
    if (a - 1 > 0) {
        ans += ceil(a - 1);
    }
    if (b == 'y')ans += 5;
    cout << ans << endl;

    return 0;
}
